package com.vargas.studypartner;

import Util.ErrorHelper;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * Activity for handling the Quick Notes options:
 * 1)Video Recording
 * 2)Audio Recording
 * 3)Lecture Notes
 * 4)Note Cards
 * */
public class QuickNotesActivity extends Activity{

	/**
	 * Creates objects and sets event listeners to be used by this activity
	 * @param	savedInstanceState	The instance state of the application.{@link Bundle}
	 * */
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.quicknotes);
		
		Button btnNoteCards = (Button)findViewById(R.id.btnNoteCards);
		btnNoteCards.setOnClickListener(CreateNoteCardsButtonListener());
	}
	
	/**
	 * Click handler for the Note Cards button
	 * */
	private OnClickListener CreateNoteCardsButtonListener(){
		return new OnClickListener() {
			@Override
			public void onClick(View v) {
				try {
					Intent decksActivity = new Intent(v.getContext(), ManageDecksActivity.class);
					startActivity(decksActivity);
				} catch (Exception e) {
					ErrorHelper.reportError(QuickNotesActivity.this, e);
				}
			}
		};
	}
}
